package com.itheima.controller.ums;

import com.itheima.core.R;
import com.itheima.pojo.ums.UmsMemberLevel;
import com.itheima.service.ums.UmsMemberLevelService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/memberLevel")
public class UmsMemberLevelController {
    @DubboReference
    private UmsMemberLevelService umsMemberLevelService;


    /**
     * 查询所有会员等级
     * @return
     */
    @GetMapping("/list")
    public R UmsMemberLevel(){
        List<UmsMemberLevel> list = umsMemberLevelService.list();
        return R.success(list);
    }


}
